package com.caishi.lkx.user.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;

import java.time.LocalDateTime;
import java.util.List;


@Builder
@NoArgsConstructor
@AllArgsConstructor
@Setter
@Getter
@TableName("distribution_users")
public class DistributionUser {

    // Getters and Setters
    @TableId(value = "id", type = IdType.NONE)
    private String id;

    @TableField("levels_id")
    private Integer levelsId;

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    private LocalDateTime updatedAt;
    @TableField("deleted")
    private Boolean deleted;
    @TableField("parent_id")
    private String parentId;


    //    分销人员名称
    @TableField(exist = false)
    private String name;

    //    递归时赋值
    @TableField(exist = false)
    private int level;
    //    分销等级名称
    @TableField(exist = false)
    private String levelName;
    @TableField(exist = false)
    private List<DistributionUser> children;
}
